#include "GravityGenerator.h"

using namespace PHYOgre;
GravityGenerator::GravityGenerator(void)
	:mGravityForce(0.0f,-9.81f,0.0f)
{
}


GravityGenerator::~GravityGenerator(void)
{
}

//---------------ForceGeneratorInterface-----------------------------
void GravityGenerator::UpdateForce(IntegrableInterface *iEntity, const Real& iDt)
{
	if (!iEntity->HasFiniteMass())
		return;

	iEntity->AddForce(mGravityForce / iEntity->GetInverseMass());
}